﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlServerCe;
using System.IO;
using System.Reflection;


namespace SkynetCE.Foundation.Services.DatabaseService
{
    public  class DatabaseService : IDatabaseService
    {
        public string ApplicationConnectionString
        {
            get
            {
                string databasePath = Path.GetDirectoryName(
                     Assembly.GetExecutingAssembly().GetName().CodeBase);
                return "Data Source=" + databasePath + "\\SkynetLibrary.sdf;";
            }
        }
        public string OleDbServerConnectionString
        {
            get {
                return @"Provider=SQLOLEDB.1;Password=Pa$$w0rd;Persist Security Info=True;User ID=sa;Initial Catalog=skynetlibrary;Data Source=DEVMOBILE\DEVMOBILE";
            }
        }

        #region IDatabaseService Members


        public string MergeAppConnectionString
        {
            get {
                string databasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
                return "Data Source=" + databasePath + "\\SkynetLibraryRep.sdf;";      
            }
        }

        #endregion
    }
}
